#ifndef MONITORPRO_HELPER_H
#define MONITORPRO_HELPER_H

#include "php_monitorpro.h"

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>

long random(long max);
std::string uuid();
std::string str_replace(std::string subject, std::string source, std::string replace);
std::string server_param(std::string name);
std::vector<std::string> split(std::string str, std::string pattern);
void logger(std::string msg);
bool starts_with(const char *pre, const char *str);
zval *read_obj_property(zval *obj, const char *property, std::string obj_class);
zval *read_property(zval *obj, const char *property);
std::string str_replace_all(std::string source, std::string old_str, std::string new_str);
zval *func_get_arg(zend_execute_data *execute_data, long pos);
long func_num_args(zend_execute_data *execute_data);

std::string thisNode();
std::string thisService();
std::string thisInstance();

std::string pushgateway_uri();

#endif